public class Test {
    public static int  sum(int n){
        if(n<10){
            return n;
        }
        return n%10+sum(n/10);
    }
    public static int fun(int n){

        if(1 == n){
            return 1;
        }
        return n+fun(n-1);
    }


    public static void func(int n){
        if(n>10){
            func(n/10);
            System.out.println(n%10);
        }else{
            System.out.println(n);
        }

    }
    public static void main(String[] args) {
        System.out.println(sum(1437));
    }
    public static int max(int a, int b) {
        return a > b ? a : b;
    }

    public static int max(int a, int b, int c) {
        int tmp = a > b ? a : b;
        return tmp > c ? tmp : c;
    }

    public static void main2(String[] args) {
        System.out.println(max(3, 5));
        System.out.println(max(3, 5, 2));
    }

    public static void main1(String[] args) {
        if (isLeapYear(2024)) {
            System.out.println("是闰年");
        } else {
            System.out.println("不是闰年");
        }

    }

    public static int add(int a, int b) {
        int ret = a + b;
        return ret;
    }

    public static double add(double a, double b) {
        return a + b;
    }

    public static boolean isLeapYear(int year) {
        return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
    }
}
